package view;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
/**
 * Summary description for AddRegexp
 *
 */
public class AddRegexp extends JFrame
{
	// Variables declaration
	private JLabel lblProtocol;
	private JLabel lblRegexp;
	private JTextField txtProtocol;
	private JTextField txtRegexp;
	private JButton cmdFinish;
	private JButton cmdCancel;
	private JButton cmdHelp;
	private JPanel contentPane;
	// End of variables declaration


	public AddRegexp()
	{
		super();
		initializeComponent();
		//
		// TODO: Add any constructor code after initializeComponent call
		//

		this.setVisible(true);
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always regenerated
	 * by the Windows Form Designer. Otherwise, retrieving design might not work properly.
	 * Tip: If you must revise this method, please backup this GUI file for JFrameBuilder
	 * to retrieve your design properly in future, before revising this method.
	 */
	private void initializeComponent()
	{
		lblProtocol = new JLabel();
		lblRegexp = new JLabel();
		txtProtocol = new JTextField();
		txtRegexp = new JTextField();
		cmdFinish = new JButton();
		cmdCancel = new JButton();
		cmdHelp = new JButton();
		contentPane = (JPanel)this.getContentPane();

		//
		// lblProtocol
		//
		lblProtocol.setText("Protocol:");
		//
		// lblRegexp
		//
		lblRegexp.setText("Regular Expression:");
		//
		// txtProtocol
		//
		txtProtocol.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				txtProtocol_actionPerformed(e);
			}

		});
		//
		// txtRegexp
		//
		txtRegexp.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				txtRegexp_actionPerformed(e);
			}

		});
		//
		// cmdFinish
		//
		cmdFinish.setText("Finish");
		cmdFinish.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				cmdFinish_actionPerformed(e);
			}

		});
		//
		// cmdCancel
		//
		cmdCancel.setText("Cancel");
		cmdCancel.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				cmdCancel_actionPerformed(e);
			}

		});
		//
		// cmdHelp
		//
		cmdHelp.setText("Help");
		cmdHelp.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				cmdHelp_actionPerformed(e);
			}

		});
		//
		// contentPane
		//
		contentPane.setLayout(null);
		addComponent(contentPane, lblProtocol, 21,17,60,18);
		addComponent(contentPane, lblRegexp, 24,76,106,18);
		addComponent(contentPane, txtProtocol, 21,40,100,22);
		addComponent(contentPane, txtRegexp, 22,100,489,22);
		addComponent(contentPane, cmdFinish, 36,153,83,29);
		addComponent(contentPane, cmdCancel, 138,153,83,28);
		addComponent(contentPane, cmdHelp, 239,153,83,28);
		//
		// AddRegexp
		//
		this.setTitle("Adding Regular Expression");
		this.setLocation(new Point(100, 100));
		this.setSize(new Dimension(526, 247));
	}

	/** Add Component Without a Layout Manager (Absolute Positioning) */
	private void addComponent(Container container,Component c,int x,int y,int width,int height)
	{
		c.setBounds(x,y,width,height);
		container.add(c);
	}

	//
	// TODO: Add any appropriate code in the following Event Handling Methods
	//
	private void txtProtocol_actionPerformed(ActionEvent e)
	{
		System.out.println("\ntxtProtocol_actionPerformed(ActionEvent e) called.");
		// TODO: Add any handling code here

	}

	private void txtRegexp_actionPerformed(ActionEvent e)
	{
		System.out.println("\ntxtRegexp_actionPerformed(ActionEvent e) called.");
		// TODO: Add any handling code here

	}

	private void cmdFinish_actionPerformed(ActionEvent e)
	{
		System.out.println("\ncmdFinish_actionPerformed(ActionEvent e) called.");
		// TODO: Add any handling code here

	}

	private void cmdCancel_actionPerformed(ActionEvent e)
	{
		System.out.println("\ncmdCancel_actionPerformed(ActionEvent e) called.");
		// TODO: Add any handling code here

	}

	private void cmdHelp_actionPerformed(ActionEvent e)
	{
		System.out.println("\ncmdHelp_actionPerformed(ActionEvent e) called.");
		// TODO: Add any handling code here

	}

	//
	// TODO: Add any method code to meet your needs in the following area
	//
}
